package org.sgsm.dungeon.generator;

import java.io.File;
import java.io.IOException;

import java.util.Iterator;
import java.util.List;

import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import org.jdom.input.SAXBuilder;

public class XmlReader
{
  public XmlReader()
  {
  }

  protected void readALL() throws JDOMException, IOException
  {
    SAXBuilder sxb = new SAXBuilder();
    Document document = sxb.build(new File("path", "fileName"));
    Element racine = document.getRootElement();
    List listService = racine.getChildren("noeud");
    Iterator i = listService.iterator();
    while (i.hasNext())
    {
      Element courant = (Element)i.next();
      courant.getChild("nom").getText();
    }
  }
}
